---
title: AnthropicStream
description: Learn to use AnthropicStream helper function in your application.
---

# `AnthropicStream`

<Note type="warning">
  AnthropicStream is part of the [legacy Anthropic
  integration](/providers/legacy-providers/anthropic). It is not compatible with
  the AI SDK 3.1 functions. It is recommended to use the [AI SDK Anthropic
  Provider](/providers/ai-sdk-providers/anthropic) instead.
</Note>

It is a utility function that transforms the output from Anthropic's SDK into a ReadableStream. It uses AIStream under the hood, applying a specific parser for the Anthropic's response data structure.

## Import

### React

<Snippet text={`import { AnthropicStream } from "ai"`} prompt={false} />

<ReferenceTable packageName="streams" functionName="AnthropicStream" />
